//
//  YGContainerProtocol.h
//  luGongPro
//
//  Created by 王庆学 on 2017/8/24.
//  Copyright © 2017年 王庆学. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void(^YGTapBlock)(NSIndexPath *indexPath);

@protocol YGRenderProtocol;

@protocol YGContainerProtocol <NSObject>

@required

- (NSInteger)numberOfChildModelsInContainer;

- (id<YGRenderProtocol>)childFloorModelAtIndex:(NSInteger)index;

@optional

- (CGFloat)heightForHeaderInContainer;

- (UIView *)viewForHeaderInContainer;

@end

@protocol YGRenderProtocol <NSObject>

@required

- (NSString *)floorIdentifier;

@end

@protocol YGCellProtocol <NSObject>

@optional

+ (CGSize)calculateSizeWithModel:(id<YGRenderProtocol>)model constrainedToSize:(CGSize)size;

+ (id)loadFromXib;

- (void)bindModel:(id<YGRenderProtocol>)model;

- (void)bindModel:(id<YGRenderProtocol>)model
        nextModel:(id<YGRenderProtocol>)nextModel
         indexRow:(NSInteger)indexRow;

- (void)bindTapBlock:(YGTapBlock)block;

- (RACSignal *)dateSelectedCalendarSignal;

@end
